<?php

namespace app\expert\controller;
use app\common\controller\PCBase;
use app\common\controller\DBase;
use app\expert\logic\ExpertInfoLogic;
use  think\App;
class ExpertInfo extends PCBase
{



    /**
     * index
     * @throws Throwable
     */
    public function index()
    {
        $params     = $this->request->post();
        // $admin_id   = $this->getAdminId();
        // $group_id   = $this->getAdminGroupId();
        // $params['adminId']  = $admin_id;
        // $params['group_id'] = $group_id;
        $ExpertInfoLogic = new ExpertInfoLogic();
        return $ExpertInfoLogic->index($params);
    }

    /**
     * export
     * @throws Throwable
     */
    public function export()
    {
        $params     = $this->request->post();
        $ExpertInfoLogic = new ExpertInfoLogic();
        return $ExpertInfoLogic->export($params);
    }

    /**
     * 添加
     * @throws Throwable
     */
    public function add()
    {
        $post = $this->request->post();
        $ExpertInfoLogic = new ExpertInfoLogic();
        $result = $ExpertInfoLogic->add($post);
        return $result;
    }

    /**
     * 回显
     * @throws Throwable
     */
    public function find($id = null)
    {
        $post = $this->request->post();
        $id = $post['id'] ?? 0;
        $ExpertInfoLogic = new ExpertInfoLogic();
        $result = $ExpertInfoLogic->find($id);
        return $result;
    }
    /**
     * 编辑
     * @throws Throwable
     */
    public function edit()
    {
        $post = $this->request->post();
        $ExpertInfoLogic = new ExpertInfoLogic();
        $result = $ExpertInfoLogic->edit($post);
        return $result;
    }

    /**
     * 确认
     * @throws Throwable
     */
    public function confirm()
    {
        $post = $this->request->post();
        $ExpertInfoLogic = new ExpertInfoLogic();

        // $group_id   = $this->getAdminGroupId();
        // $post['group_id'] = $group_id;

        $result = $ExpertInfoLogic->confirm($post);
        return $result;
    }


}